load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "retry",
    srcs = ["retry.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/util/retry",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/util/log",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "retry_test",
    size = "small",
    srcs = [
        "main_test.go",
        "retry_test.go",
    ],
    embed = [":retry"],
    deps = [
        "//pkg/util/log",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//require",
    ],
)
